package com.doubletick.proxy.ipidea.domain;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.doubletick.common.annotation.Excel;
import com.doubletick.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

@Data
@TableName("t_proxy_flow_charge_history")
public class ProxyFlowChargeHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 充值类型 0 充值  1 扣除
     */
    @Excel(name = "充值类型 0 充值  1 扣除")
    private String chargeType;

    /**
     * 流量M
     */
    @Excel(name = "流量M")
    private Long flow;

    /**
     * 代理id
     */
    @Excel(name = "代理id")
    private String proxyId;

    @TableField(exist = false)
    private String proxyAccount;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    @TableField(exist = false)
    @Excel(name = "用户名")
    private String username;

    /**
     * 状态 0 成功  1失败
     */
    @Excel(name = "状态 0 成功  1失败")
    private String operateResult;

    /**
     * 返回信息
     */
    @Excel(name = "返回信息")
    private String msg;

    /**
     * 操作人id
     */
    @Excel(name = "操作人id")
    private Long createUserId;

    @TableField(exist = false)
    @Excel(name = "操作人名称")
    private String createUsername;

    @Excel(name = "创建时间")
    private Date createTime;

    /**
     * 操作后 M
     */
    @Excel(name = "操作后")
    private Long afterFlow;

    /**
     * 操作前 M
     */
    @Excel(name = "操作前")
    private Long beforeFlow;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
